package cn.bearspark.forward.provider.dao.key;

import cn.bearspark.framework.redis.starter.buffer.list.RedisPageListBufKeyBuilder;
import cn.bearspark.framework.redis.starter.key.RedisKeyBuilder;
import org.springframework.stereotype.Component;

/**
 * 转发动态缓存的键的构造器
 *
 * @author f
 */
@Component
public class HappeningFwdBufferKeyBuilder extends RedisKeyBuilder implements RedisPageListBufKeyBuilder {

    /**
     * 转发动态的用户的 id 的缓存的键的前缀
     */
    private static final String FWD_HAPPENING_USER_ID = "fwdHappeningUserId";

    @Override
    public String buildPageListBufKey(long happeningId) {
        return super.getPrefix() + FWD_HAPPENING_USER_ID + super.getSplitItem() + happeningId;
    }
}
